Show SQL Query dialog box

This dialog box appears when you choose the Show SQL Query command from the Database menu.

Use the Show SQL Query dialog box to edit the SQL Query.

The Show SQL Query dialog box displays the SQL query that the program is sending to your SQL server.

The query can have up to four parts:

SELECT

SELECT lists all of the fields used in the report, including fields used in formulas, totals, the sort order, the selection formula, and ranges. For example:

SELECT
DIV_INFO.DIVISION_ID, DIV_INFO.DIVISION_NAME,
DEP_INFO.DEPARTMENT_ID, DEP_INFO.DEPARTMENT_NAME

«Shows that the report is using the DIVISION_ID, DIVISION_NAME, DEPARTMENT_ID, and DEPARTMENT_NAME fields.»

FROM

FROM lists all the tables used in the report, and each table name is followed by an alias name. For example:

FROM
SYSADM.DIV_INFO DIV_INFO,
SYSADM.DEP_INFO DEP_INFO

«Shows that the report is using the DIV_INFO and DEP_INFO tables from the SYSADM database, and in each case, the alias name is the same as the table name.»

WHERE

WHERE specifies any links between tables and field ranges for the report. For example:

WHERE
DIV_INFO.DIVISION_ID = DEP_INFO.DIVISION_ID

«Shows that the DIV_INFO and DEP_INFO tables are linked via the DIVISION_ID fields.»

ORDER BY

ORDER BY sorts the data in alphabetic or numeric ascending or descending order. For example:

ORDER BY
DIV_INFO.DIVISION_ID ASC

«Sorts the records in ascending order by the values that appear in the DIV_INFO.DIVISION_ID field.»

Query

Use this edit box to edit the SQL Query. You can use the cut, paste and copy buttons as editing tools.

Cut

This button is used to cut selected text out of the SQL Query onto the Windows clipboard.

Paste

This button is used to paste text from the clipboard to the current cursor position in the Show SQL Query dialog box.

Copy

This button is used to copy selected text to the Windows clipboard.

Reset

This button undoes any changes you have made to the SQL query, restoring it to what the program had originally created.

Related topics

Show SQL Query command



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com